package controller.GoodsTable;

import entity.MsgResult;
import entity.goods2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import service.SelectGoodsBySelectiveService;

import java.util.HashMap;
import java.util.List;
import java.util.Objects;

@Controller
public class SelectGoodsBySelectiveController {
    @Autowired
    private SelectGoodsBySelectiveService selectGoodsBySelectiveService;

    @RequestMapping("/selectGoodsBySelective")
    @ResponseBody
    public MsgResult selectGoodsBySelective(goods2 goods2){
        MsgResult msgResult = new MsgResult();
        HashMap<String, Object> map = new HashMap<>();
        List<entity.goods2> goodss = selectGoodsBySelectiveService.selectGoodsBySelective(goods2);
        map.put("goodss",goodss);
        msgResult.setFlag(1);
        msgResult.setData(map);
        return msgResult;
    }
}
